import Layout from '@/layout'

export default {
  path: '/config',
  name: 'config',
  redirect: '/config/accounts',
  component: Layout,
  alwaysShow: true, // will always show the root menu
  meta: {
    title: '系统设置',
    icon: 'example',
    roles: ['admin'] // you can set roles in root nav
  },
  children: [
    {
      path: 'accounts',
      component: () => import(/* webpackChunkName: "configAccounts" */ '@/views/Config/Accounts'),
      name: 'accounts',
      meta: {
        title: '账号管理',
        roles: ['user'] // or you can only set roles in sub nav
      }
    },
    {
      path: 'toolbar',
      name: 'toolbar',
      component: () => import(/* webpackChunkName: "configToolbar" */ '@/views/Config/Toolbar'),
      meta: {
        roles: ['user'],
        title: '自定义工具栏'
      }
    },
    {
      path: 'log',
      name: 'log',
      component: () => import(/* webpackChunkName: "configLog" */ '@/views/Config/Log'),
      meta: {
        roles: ['user'],
        title: '操作日志'
      }
    },
    {
      path: 'setIp',
      name: 'setIp',
      component: () => import(/* webpackChunkName: "configSetIp" */ '@/views/Config/SetIp'),
      meta: {
        roles: ['user'],
        title: '平台设置'
      }
    },
    {
      path: 'attendance',
      name: 'attendance',
      component: () => import(/* webpackChunkName: "AttendanceRule" */ '@/views/DataMaintenance/Attendance'),
      meta: {
        title: '系统参数设置',
        roles: ['user']
      }
    }
  ]
}
